/*
1.获取屏幕宽度
2.动态设置html字体大小
*/
const setRem = () => {
  const html = document.documentElement
  const width = html.getBoundingClientRect().width
  // 动态设置html字体大小
  html.style.fontSize = width / 10 + 'px'
}
window.addEventListener('orientationchange', setRem)
window.addEventListener('resize', setRem)

setRem()
